﻿using System.Web.UI.WebControls;
using System.Web.UI;
using System.ComponentModel;
using SiteUnity.Layers.Application;
using SiteUnity.Layers.Application.BaseClasses;

namespace SiteUnity.Frame.Modules
{
    [DefaultProperty("Text")]
    [ToolboxData("<{0}:SiteHeader runat=server/>")]
    public class SiteHeader : BaseWebControl
    {
        public HtmlTextWriterTag HtmlTag { get; set; }

        protected override void RenderContents(HtmlTextWriter output)
        {  
            output.AddAttribute(HtmlTextWriterAttribute.Href, SiteManager.Website.Pages[0].Url);
            output.RenderBeginTag(HtmlTextWriterTag.A);
            output.Write(SiteManager.Website.Name);
            output.RenderEndTag();
        }
    }
}
